import { createApp } from "vue";
import "./style.css";
import App from "./App.vue";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import router from "./routes/index.js";
import pinia from "@store/index.js";
import zhCn from "element-plus/es/locale/lang/zh-cn";
import { logProjectStart } from "@utils/console.js";

import G_Table from "@cpmt/glob/G_Table.vue";
import G_Paging from "@cpmt/glob/G_Paging.vue";
import G_HomeHead from "@cpmt/glob/G_HomeHead.vue";
import G_QueryFun from "@cpmt/glob/G_QueryFun.vue";
const app = createApp(App);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}
// const pinia = createPinia()

// 输出环境配置信息
logProjectStart();

app.component("G_Table", G_Table);
app.component("G_Paging", G_Paging);
app.component("G_HomeHead", G_HomeHead);
app.component("G_QueryFun", G_QueryFun);

app
  .use(router)
  .use(pinia)
  .use(ElementPlus, {
    locale: zhCn,
  })
  .mount("#app");
